<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <h3>style样式</h3>
      <!-- <p style="color: red; font-size: 50px">hello vue</p> -->

      <!-- 可以使用对象的语法写:style -->
      <!-- key对应的css的属性，value是变量或者js表达式 -->
      <button @click="late += 10">btn</button>
      <p
        :style="{color: color, 'font-size': size + 'px', transform: 'translateX(' + late + 
        'px)'}"
      >
        hello vue
      </p>
    </div>

    <script src="../../Vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {
          size: 20,
          color: "blue",
          late: 20,
        },
      });
    </script>
  </body>
</html>
